package com.design.model.proxy;

import java.util.Objects;

/**
 * @program: study
 * @className: Proxy
 * @description: TODO
 * @author: kukuxiahuni
 * @create: 2019-07-16 09:16
 * @version: v1.0
 **/
public class Proxy extends Subject {

    RealSubject realSubject;

    @Override
    public void request() {
        if (Objects.isNull(realSubject)) {
            this.realSubject = new RealSubject();
        }
        this.realSubject.request();
    }
}
